<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>变量计算</title>
</head>

<body>

</body>
<script>
    // 以下值为true == 会尽量让两边的相等 转换类型
    console.log(100 == '100')
    console.log(0 == "")
    console.log(0 == false)
    console.log(false == "")
    console.log(null == undefined)

    // 除了 == null之外，其他都一律用 ===
    let obj = { x: 100 }
    if (obj.a == null) { }
    // obj.a == null ==> obj.a === null || obj.a === undefined

</script>

</html>